<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var arr = [23, 456, 6787, 1, 34];
        var newarr = arr.filter(function(value, index, arr) {
            return value > 50;
        }); //返回一个新数组
        console.log(newarr);
    </script>
</body>

</html>